Set Status of LED

  • Function:

    magicbox.set_led_state(port, index, on)
    
  • Description: set the on/off status of a specified light

  • Required parameter:

    • port: controller port. data type: int, range: 1~6
    • index: position of light. data type: int, range: 1~3
    • on: status of light. True: the light is on; False: the light is off
  • Return:
    • True: The command has been finished.
    • False: The command has not been finished.
  • Example

    magicbox.set_led_state(port=1, index=1, on=True)
    

    Set the first light connected to Port 1 of controller as on.

results matching ""

    No results matching ""